<?php
include_once(_CORE_PATH. "entity_prototype.php");
class BlogsEntity extends entity_prototype
{ 
	protected $_name = 'blogs';
	
	public function __construct()
	{
	
	}
	
	public function GetId()
	{
		return (int)$this->Get('id');		
	}	
	
	public function SetId($id)
	{
		$this->Set('id', (int)$id);		
	}	

	public function SetUserId($userId = null)
	{
		if (!is_null($userId)) $userId = (int)$userId ? (int)$userId : null;
		$this->Set('userId', $userId);	
	}
	
	public function GetUserIdSql()
	{
		$val = $this->Get('userId');
		if (is_null($val)) return 'NULL';
		return $val;			
	}	
}